package cn.kgc.spring.day02.servlet;

import cn.kgc.spring.day02.service.UserService;
import org.springframework.stereotype.Controller;

import javax.annotation.Resource;

/**
 * @author 课工场
 * @date 2024/11/5
 * @description
 *       userServlet    id
 *   @Resource  注解也可是实现对象之间依赖关系的维护
 *   byName
 *   byType
 *
 *   jdk17  中该注解已经不在javax.annotation包中
 */
@Controller("servlet")
public class UserServlet {

   @Resource(name = "userServiceImpl")
   private UserService userService;


   public Boolean  removeUser(Integer id){
      return   userService.removeUser(id);
   }

}
